package com.grademaster.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.grademaster.entity.Scores;
import com.grademaster.vo.ScoreManageVO;
import com.grademaster.vo.ScoreStatisticsVO;
import com.grademaster.vo.ScoreVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【scores(成绩表)】的数据库操作Mapper
* @createDate 2024-06-25 13:57:10
* @Entity generator.domain.Scores
*/
@Mapper
public interface ScoresMapper extends BaseMapper<Scores> {

    /**
     * 获取成绩列表
     * @param termName
     * @param courseName
     * @param verificationStatus
     * @param page
     * @param pageSize
     * @return
     */
    List<ScoreVO> getScores(@Param("termName") String termName,
                            @Param("courseName") String courseName,
                            @Param("verificationStatus") Integer verificationStatus,
                            @Param("page") int page,
                            @Param("pageSize") int pageSize,
                            @Param("studentId")String studentId);

    /**
     * 获取成绩总数量
     * @param termName
     * @param courseName
     * @param verificationStatus
     * @return
     */
    int countScores(@Param("termName") String termName,
                    @Param("courseName") String courseName,
                    @Param("verificationStatus") Integer verificationStatus,
                    @Param("studentId")String studentId);

    /**
     * 教师获取成绩管理列表
     * @param username
     * @param name
     * @param className
     * @param termName
     * @param courseName
     * @param verificationStatus
     * @param isPass
     * @param page
     * @param pageSize
     * @return
     */
    List<ScoreManageVO> selectScores(
            @Param("username") String username,
            @Param("name") String name,
            @Param("className") String className,
            @Param("termName") String termName,
            @Param("courseName") String courseName,
            @Param("verificationStatus") String verificationStatus,
            @Param("isPass") String isPass,
            @Param("page") int page,
            @Param("pageSize") int pageSize,
            @Param("teacherId")String teacherId,
            @Param("usernameOrder")String usernameOrder,
            @Param("scoreValueOrder")String scoreValueOrder
    );

    /**
     * 教师获取成绩管理列表总数量
     * @param username
     * @param name
     * @param className
     * @param termName
     * @param courseName
     * @param verificationStatus
     * @param isPass
     * @return
     */
    int countselectScores(
            @Param("username") String username,
            @Param("name") String name,
            @Param("className") String className,
            @Param("termName") String termName,
            @Param("courseName") String courseName,
            @Param("verificationStatus") String verificationStatus,
            @Param("isPass") String isPass,
            @Param("teacherId")String teacherId
    );

    /**
     * 获取成绩统计
     * @param teacherId
     * @param username
     * @param name
     * @param className
     * @param termName
     * @param courseName
     * @param verificationStatus
     * @param isPass
     * @return
     */
    ScoreStatisticsVO getScoreStatistics(@Param("teacherId") String teacherId,
                                         @Param("username") String username,
                                         @Param("name") String name,
                                         @Param("className") String className,
                                         @Param("termName") String termName,
                                         @Param("courseName") String courseName,
                                         @Param("verificationStatus") String verificationStatus,
                                         @Param("isPass") String isPass);
}




